package org.csu.mybigpro.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

@Data
@TableName(value = "quiz_game_session", autoResultMap = true)
public class QuizGameSession {

    @TableId(type = IdType.AUTO)
    private Long id;

    private Integer userId;

    private String topic;

    // 复用Exam表的题目结构，以JSON格式存储
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<Map<String, Object>> questions;

    private Integer currentQuestionIndex;

    private Integer score;

    private String status; // IN_PROGRESS, COMPLETED

    private LocalDateTime createdAt;
}